package com.goldwind.alipay.controller;

import com.goldwind.alipay.util.PayUtil;
import com.goldwind.pojo.AliPayPojo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "操作员支付宝支付")
@RestController
@RequestMapping("/system/admin")
public class AliPayController {

    @ApiOperation(value = "支付宝支付")
    @PostMapping("/aliPay")
    public String getAllAdmin(@RequestBody AliPayPojo aliPayPojo)
    {
        //支付封装结果返回
        String result = PayUtil.aliPay(aliPayPojo);
        //业务逻辑
        //System.out.println(result);
       //我这里简单粗暴，直接返回字符串，前端解析.....
        return result;
    }
}
